package com.shinewind.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "Article实体类")
public class Article implements Serializable {
  @TableId(type = IdType.ASSIGN_ID)
  @ApiModelProperty(value = "文章id")
  private Integer aId;
  @ApiModelProperty(value = "模型id")
  private String mId;
  @ApiModelProperty(value = "用户id")
  private String uId;
  @ApiModelProperty(value = "标题")
  private String title;
  @ApiModelProperty(value = "内容")
  private String content;
  @ApiModelProperty(value = "文章观看次数")
  private Integer watch;
  @ApiModelProperty(value = "文章发布时间")
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Date publishTime;
  @ApiModelProperty(value = "文章更新时间")
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Date updateTime;
  @ApiModelProperty(value = "封面图",notes = "用于在收藏页面显示")
  private String cover;
}
